#!/usr/bin/env python3

import rospy
from DrRobotController_six_axes_can.msg import tutorial_program
# import DrRobotController_six_axes as dr

def callback(data):
    import DrRobotController_six_axes as dr
    dr.tutorial_program(id_num=data.id_num, pay_load=data.pay_load, F=data.F, n=data.n, t=data.t)
    rospy.loginfo("tutorial_program_node")


def listener():
    rospy.init_node("tutorial_program", anonymous=True)
    rospy.Subscriber("tutorial_program", tutorial_program, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

